<?php

if (!function_exists('menus')) {
	function menus($slug) {
		if (!$slug) {
			return null;
		}
		
		$menu = \Boosen\Admin\Menus\Models\Menu::where('slug', $slug)->first();
		if (!$menu || $menu->disabled) {
			return null;
		}

		return $menu->getItemsTree();
	}
}